using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;


/// <summary>
/// Summary description for BulletedListHelper
/// </summary>
public partial class ControlHelper
{
   public int FillDataTableToBulletedList(
   BulletedList bulletedList, string dataTextField,
   string dataValueField)
    {
        int totalRecord = 0;
        DataTable dataTable =
        sqlServerProvider.GetDataTable();
        if (dataTable != null)
        {
            bulletedList.DataSource = dataTable;
            bulletedList.DataTextField = dataTextField;
            bulletedList.DataValueField = dataValueField;
            totalRecord = dataTable.Rows.Count;
        }
        else
            bulletedList.DataSource = null;
        bulletedList.DataBind();
        return totalRecord;
    }
}
